package com.qf.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qf.Movie;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 作者：Xx凯丶
 * 时间：2022/4/22 15:11
 */
@Mapper
public interface MovieMapper extends BaseMapper<Movie> {
    @Select("SELECT t.type_name\n" +
            "FROM movie m LEFT JOIN movie_type mt on m.movie_Id = mt.movie_Id\n" +
            "LEFT JOIN type t ON mt.type_id = t.type_id\n" +
            "WHERE m.movie_Id=#{movieId}")
    public List<String> selectTypeByMovieId(Integer movieId);
}
